package com.tangfuzhong.aop3;


import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * <p><em>Created on 2021/12/28 4:50 下午</em></p>
 * 自定义实现简单AOP
 * 自定义的方法拦截器
 * @author fuzhongtang
 * @since 1.0.1
 */
public class UserMethodInterceptor3 implements MethodInterceptor {

    private final Object target;
    public UserMethodInterceptor3(Object target)
    {
        this.target = target;
    }

    @Override
    public Object intercept(Object o, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {

        Object retVal = methodProxy.invoke(this.target, args);

        return retVal;
    }



}
